home *** CD-ROM | disk | FTP | other *** search
- // ⌐ 2005 The Weather Channel Interactive, Inc. All Rights Reserved.
-
- /*
- AppConfig - Manager object for
- application configuration
- */
- function AppConfig() {
- this.fileManager = new FileManager();
- this.info = new AppConfigInfo();
- this.allWindows = {};
- this.allData = {};
- this.allMaps = {};
- this.allVideos = {};
- this.allIcons = {};
- this.allLinks = {};
- }
-
- AppConfig.prototype = {
- fileManager : null,
- info : null,
- addData : null,
- allWindows : null,
- allMaps : null,
- allVideos : null,
- allIcons : null,
- allLinks : null,
-
- // THIS METHOD LOADS DATA
- // FROM CONFIG XML
- load : function() {
- try {
- var myDOM = this.fileManager.getAppConfigDOM();
- // now parse the dom to populate this object!
- var rootElement = myDOM.getElementsByTagName("appconfig")[0];
- // get the info element
- var infoElement = rootElement.getElementsByTagName("info")[0];
- this.info.setVersion(infoElement.getElementsByTagName("version")[0].firstChild.nodeValue);
- this.info.setLastUpdate(infoElement.getElementsByTagName("lastupdate")[0].firstChild.nodeValue );
- this.info.setIsInitial(infoElement.getElementsByTagName("initial")[0].firstChild.nodeValue );
-
- var windowsElements = rootElement.getElementsByTagName("windows")[0].getElementsByTagName("window");
- var a = 0;
- for(a = 0;a < windowsElements.length;a++) {
- var nextWinElement = windowsElements[a];
- var appWinObj = new AppWindow();
- appWinObj.setName(nextWinElement.getAttribute("name"));
- appWinObj.setTitle(nextWinElement.getElementsByTagName("title")[0].firstChild.nodeValue);
- appWinObj.setWidth(nextWinElement.getElementsByTagName("width")[0].firstChild.nodeValue);
- appWinObj.setHeight(nextWinElement.getElementsByTagName("height")[0].firstChild.nodeValue);
- this.addWindow(appWinObj);
- }
-
- var dataElements = rootElement.getElementsByTagName("data")[0].getElementsByTagName("dataelement");
- var b = 0;
- for(b=0;b<dataElements.length;b++) {
- var nextDataElement = dataElements[b];
- var newAppDataObj = new AppData();
- newAppDataObj.setName(nextDataElement.getAttribute("name"));
- try{
- var upinterval = new AppDataUpdateInterval();
- upinterval.setTime(nextDataElement.getElementsByTagName("updateinterval")[0].getAttribute("time"));
- upinterval.setMeasure(nextDataElement.getElementsByTagName("updateinterval")[0].getAttribute("measure"));
- newAppDataObj.setUpdateInterval(upinterval);
- }catch(e){}
- var dataurl = new AppDataURL();
- dataurl.setBase(nextDataElement.getElementsByTagName("dataurl")[0].getAttribute("base"));
- var allparams = nextDataElement.getElementsByTagName("dataurl")[0].getElementsByTagName("params")[0].getElementsByTagName("param");
- var bb = 0;
- for(bb = 0;bb<allparams.length;bb++) {
- var newParamObj = new AppDataURLParam();
- newParamObj.setName(allparams[bb].getAttribute("name"));
- dataurl.addNewParam(newParamObj);
- }
- try{
- newAppDataObj.setDataURL(dataurl);
- var wxiconsObj = new AppDataWxIcons();
- wxiconsObj.setBase(nextDataElement.getElementsByTagName("wxicons")[0].getAttribute("base"));
- wxiconsObj.setSmall(nextDataElement.getElementsByTagName("wxicons")[0].getAttribute("small"));
- wxiconsObj.setLarge(nextDataElement.getElementsByTagName("wxicons")[0].getAttribute("large"));
- newAppDataObj.setWxIcons(wxiconsObj);
- var mooniconObj = new AppDataMoonphaseIcons();
- mooniconObj.setBase(nextDataElement.getElementsByTagName("moonphaseicons")[0].getAttribute("base"));
- newAppDataObj.setMoonPhaseIcons(mooniconObj);
- }catch(e){}
- this.addData(newAppDataObj);
- }
-
- var mapsElements = rootElement.getElementsByTagName("maps")[0].getElementsByTagName("map");
- var c = 0;
- for(c = 0;c<mapsElements.length;c++) {
- var nextMapElement = mapsElements[c];
- var mapObj = new AppMap();
- mapObj.setID(nextMapElement.getAttribute("id"));
- mapObj.setIsUSOnly(nextMapElement.getElementsByTagName("isusonly")[0].firstChild.nodeValue);
- mapObj.setTitle(nextMapElement.getElementsByTagName("title")[0].firstChild.nodeValue);
- mapObj.setImage(nextMapElement.getElementsByTagName("image")[0].firstChild.nodeValue);
- mapObj.setImageAlt(nextMapElement.getElementsByTagName("imagealt")[0].firstChild.nodeValue);
- mapObj.setImageWidth(nextMapElement.getElementsByTagName("imagewidth")[0].firstChild.nodeValue);
- mapObj.setImageHeight(nextMapElement.getElementsByTagName("imageheight")[0].firstChild.nodeValue);
- mapObj.setURL(nextMapElement.getElementsByTagName("url")[0].firstChild.nodeValue);
- this.addMap(mapObj);
- }
-
- var videoElements = rootElement.getElementsByTagName("videos")[0].getElementsByTagName("video");
- var d = 0;
- for(d=0;d<videoElements.length;d++) {
- var nextVideoElement = videoElements[d];
- var videoObj = new AppVideo();
- videoObj.setID(nextVideoElement.getAttribute("id"));
- videoObj.setCollection(nextVideoElement.getAttribute("collection"));
- videoObj.setName(nextVideoElement.getElementsByTagName("name")[0].firstChild.nodeValue);
- videoObj.setImage(nextVideoElement.getElementsByTagName("image")[0].firstChild.nodeValue);
- videoObj.setImageAlt(nextVideoElement.getElementsByTagName("imagealt")[0].firstChild.nodeValue);
- videoObj.setImageWidth(nextVideoElement.getElementsByTagName("imagewidth")[0].firstChild.nodeValue);
- videoObj.setImageHeight(nextVideoElement.getElementsByTagName("imageheight")[0].firstChild.nodeValue);
- videoObj.setTitle(nextVideoElement.getElementsByTagName("title")[0].firstChild.nodeValue);
- videoObj.setURL(nextVideoElement.getElementsByTagName("url")[0].firstChild.nodeValue);
- this.addVideo(videoObj);
- }
-
- var iconsElements = rootElement.getElementsByTagName("icons")[0].getElementsByTagName("icon");
- var e = 0;
- for(e=0;e<iconsElements.length;e++) {
- var nextIconElement = iconsElements[e];
- var iconObj = new AppIcon();
- iconObj.setID(nextIconElement.getAttribute("id"));
- iconObj.setURL(nextIconElement.getElementsByTagName("url")[0].firstChild.nodeValue);
- iconObj.setName(nextIconElement.getElementsByTagName("name")[0].firstChild.nodeValue);
- iconObj.setAlt(nextIconElement.getElementsByTagName("alt")[0].firstChild.nodeValue);
- iconObj.setWidth(nextIconElement.getElementsByTagName("width")[0].firstChild.nodeValue);
- iconObj.setHeight(nextIconElement.getElementsByTagName("height")[0].firstChild.nodeValue);
- iconObj.setExt(nextIconElement.getElementsByTagName("ext")[0].firstChild.nodeValue);
- this.addIcon(iconObj);
- }
-
- var linksElements = rootElement.getElementsByTagName("links")[0].getElementsByTagName("link");
- var f = 0;
- for(f=0;f<linksElements.length;f++) {
- var nextLinkElement = linksElements[f];
- var linkObj = new AppLink();
- linkObj.setID(nextLinkElement.getAttribute("id"));
- linkObj.setText(nextLinkElement.getElementsByTagName("text")[0].firstChild.nodeValue);
- linkObj.setURL(nextLinkElement.getElementsByTagName("url")[0].firstChild.nodeValue);
- linkObj.setAlt(nextLinkElement.getElementsByTagName("alt")[0].firstChild.nodeValue);
- linkObj.setIcon(nextLinkElement.getElementsByTagName("icon")[0].firstChild.nodeValue);
- this.addLink(linkObj);
- }
- } catch(e) {
- alert(e);
- }
- },
-
- // THIS METHOD WRITES DATA
- // TO CONFIG XML
- save : function() {
- try {
- this.fileManager.saveAppConfigToFile(this.toDOM());
- } catch(e) {
- alert(e);
- }
- },
-
- // THIS METHOD TRANSFORMS THIS OBJECT
- // TO XML DOM
- toDOM : function() {
- var xmlDoc = document.implementation.createDocument("", "", null);
- var rootElement = xmlDoc.createElement("appconfig");
- var info = xmlDoc.createElement("info");
- var infoVersion = xmlDoc.createElement("version");
- infoVersion.appendChild(xmlDoc.createTextNode(this.getInfo().getVersion()));
- var infoLastUpdate = xmlDoc.createElement("lastupdate");
- infoLastUpdate.appendChild(xmlDoc.createTextNode(this.getInfo().getLastUpdate()));
- var infoInitial = xmlDoc.createElement("initial");
- infoInitial.appendChild(xmlDoc.createTextNode(this.getInfo().getIsInitial()));
-
- info.appendChild(infoVersion);
- info.appendChild(infoLastUpdate);
- info.appendChild(infoInitial);
-
- rootElement.appendChild(info);
-
- var allWindows = xmlDoc.createElement("windows");
- for(var nextWinKey in this.allWindows) {
- var nextWinObj = this.allWindows[nextWinKey];
- var winElement = xmlDoc.createElement("window");
- winElement.setAttribute("name", nextWinObj.getName());
- var winElementTitle = xmlDoc.createElement("title");
- winElementTitle.appendChild(xmlDoc.createTextNode(nextWinObj.getTitle()));
- winElement.appendChild(winElementTitle);
-
- var winElementWidth = xmlDoc.createElement("width");
- winElementWidth.appendChild(xmlDoc.createTextNode(nextWinObj.getWidth()));
- winElement.appendChild(winElementWidth);
-
- var winElementHeight = xmlDoc.createElement("height");
- winElementHeight.appendChild(xmlDoc.createTextNode(nextWinObj.getHeight()));
- winElement.appendChild(winElementHeight);
-
-
- allWindows.appendChild(winElement);
- }
- rootElement.appendChild(allWindows);
-
-
- var allData = xmlDoc.createElement("data");
- for(var nextDataKey in this.allData) {
- var nextDataObj = this.allData[nextDataKey];
- var dataElement = xmlDoc.createElement("dataelement");
- dataElement.setAttribute("name", nextDataObj.getName());
-
- var dataUpdateElement = xmlDoc.createElement("updateinterval");
- dataUpdateElement.setAttribute("time",nextDataObj.getUpdateInterval().getTime());
- dataUpdateElement.setAttribute("measure",nextDataObj.getUpdateInterval().getMeasure());
- dataElement.appendChild(dataUpdateElement);
-
- var dataURLElement = xmlDoc.createElement("dataurl");
- dataURLElement.setAttribute("base", nextDataObj.getDataURL().getBase());
- var dataURLParams = xmlDoc.createElement("params");
- var allParams = nextDataObj.getDataURL().getParams();
- for(var nextParamKey in allParams) {
- var nextParam = allParams[nextParamKey];
- var nextParamElement = xmlDoc.createElement("param");
- nextParamElement.setAttribute("name", nextParam.getName());
- dataURLParams.appendChild(nextParamElement);
- }
-
- dataURLElement.appendChild(dataURLParams);
- dataElement.appendChild(dataURLElement);
-
- var dataWxIconsElement = xmlDoc.createElement("wxicons");
- dataWxIconsElement.setAttribute("base", nextDataObj.getWxIcons().getBase());
- dataWxIconsElement.setAttribute("small", nextDataObj.getWxIcons().getSmall());
- dataWxIconsElement.setAttribute("large", nextDataObj.getWxIcons().getLarge());
- dataElement.appendChild(dataWxIconsElement);
-
- var dataMoonIconsElement = xmlDoc.createElement("moonphaseicons");
- dataMoonIconsElement.setAttribute("base", nextDataObj.getMoonPhaseIcons().getBase());
- dataElement.appendChild(dataMoonIconsElement);
-
- allData.appendChild(dataElement);
- }
- rootElement.appendChild(allData);
-
- var allMaps = xmlDoc.createElement("maps");
- for(var nextMapKey in this.allMaps) {
- var nextMapObj = this.allMaps[nextMapKey];
- var nextMapElement = xmlDoc.createElement("map");
- nextMapElement.setAttribute("id", nextMapObj.getID());
- var nextMapUSElement = xmlDoc.createElement("isusonly");
- nextMapUSElement.appendChild(xmlDoc.createTextNode(nextMapObj.isUSOnly()));
- nextMapElement.appendChild(nextMapUSElement);
-
- var nextMapTitlelement = xmlDoc.createElement("title");
- nextMapTitlelement.appendChild(xmlDoc.createTextNode(nextMapObj.getTitle()));
- nextMapElement.appendChild(nextMapTitlelement);
-
- var nextMapImageElement = xmlDoc.createElement("image");
- nextMapImageElement.appendChild(xmlDoc.createTextNode(nextMapObj.getImage()));
- nextMapElement.appendChild(nextMapImageElement);
-
- var nextMapImageAltElement = xmlDoc.createElement("imagealt");
- nextMapImageAltElement.appendChild(xmlDoc.createTextNode(nextMapObj.getImageAlt()));
- nextMapElement.appendChild(nextMapImageAltElement);
-
- var nextMapImageWidthElement = xmlDoc.createElement("imagewidth");
- nextMapImageWidthElement.appendChild(xmlDoc.createTextNode(nextMapObj.getImageWidth()));
- nextMapElement.appendChild(nextMapImageWidthElement);
-
- var nextMapImageHeightElement = xmlDoc.createElement("imageheight");
- nextMapImageHeightElement.appendChild(xmlDoc.createTextNode(nextMapObj.getImageHeight()));
- nextMapElement.appendChild(nextMapImageHeightElement);
-
- var nextMapURLtElement = xmlDoc.createElement("url");
- nextMapURLtElement.appendChild(xmlDoc.createCDATASection(nextMapObj.getURL()));
- nextMapElement.appendChild(nextMapURLtElement);
-
- allMaps.appendChild(nextMapElement);
- }
- rootElement.appendChild(allMaps);
-
- var allVideos = xmlDoc.createElement("videos");
- for(var nextVideoKey in this.allVideos) {
- var nextVideoObj = this.allVideos[nextVideoKey];
- var nextVideoElement = xmlDoc.createElement("video");
- nextVideoElement.setAttribute("id", nextVideoObj.getID());
- nextVideoElement.setAttribute("collection", nextVideoObj.getCollection());
-
- var nextVideoName = xmlDoc.createElement("name");
- nextVideoName.appendChild(xmlDoc.createTextNode(nextVideoObj.getName()));
- nextVideoElement.appendChild(nextVideoName);
-
- var nextVideoImage = xmlDoc.createElement("image");
- nextVideoImage.appendChild(xmlDoc.createTextNode(nextVideoObj.getImage()));
- nextVideoElement.appendChild(nextVideoImage);
-
- var nextVideoImageAlt = xmlDoc.createElement("imagealt");
- nextVideoImageAlt.appendChild(xmlDoc.createTextNode(nextVideoObj.getImageAlt()));
- nextVideoElement.appendChild(nextVideoImageAlt);
-
- var nextVideoWidth = xmlDoc.createElement("imagewidth");
- nextVideoWidth.appendChild(xmlDoc.createTextNode(nextVideoObj.getImageWidth()));
- nextVideoElement.appendChild(nextVideoWidth);
-
- var nextVideoHeight = xmlDoc.createElement("imageheight");
- nextVideoHeight.appendChild(xmlDoc.createTextNode(nextVideoObj.getImageHeight()));
- nextVideoElement.appendChild(nextVideoHeight);
-
- var nextVideoTitle = xmlDoc.createElement("title");
- nextVideoTitle.appendChild(xmlDoc.createTextNode(nextVideoObj.getTitle()));
- nextVideoElement.appendChild(nextVideoTitle);
-
- var nextVideoURL = xmlDoc.createElement("url");
- nextVideoURL.appendChild(xmlDoc.createCDATASection(nextVideoObj.getURL()));
- nextVideoElement.appendChild(nextVideoURL);
-
- allVideos.appendChild(nextVideoElement);
- }
- rootElement.appendChild(allVideos);
-
- var allIcons = xmlDoc.createElement("icons");
- for(var nextIconKey in this.allIcons) {
- var nextIconObj = this.allIcons[nextIconKey];
- var nextIconElement = xmlDoc.createElement("icon");
- nextIconElement.setAttribute("id", nextIconObj.getID());
-
- var nextIconUrl = xmlDoc.createElement("url");
- nextIconUrl.appendChild(xmlDoc.createCDATASection(nextIconObj.getURL()));
- nextIconElement.appendChild(nextIconUrl);
-
- var nextIconName = xmlDoc.createElement("name");
- nextIconName.appendChild(xmlDoc.createTextNode(nextIconObj.getName()));
- nextIconElement.appendChild(nextIconName);
-
- var nextIconAlt = xmlDoc.createElement("alt");
- nextIconAlt.appendChild(xmlDoc.createTextNode(nextIconObj.getAlt()));
- nextIconElement.appendChild(nextIconAlt);
-
- var nextIconWidth = xmlDoc.createElement("width");
- nextIconWidth.appendChild(xmlDoc.createTextNode(nextIconObj.getWidth()));
- nextIconElement.appendChild(nextIconWidth);
-
- var nextIconHeight = xmlDoc.createElement("height");
- nextIconHeight.appendChild(xmlDoc.createTextNode(nextIconObj.getHeight()));
- nextIconElement.appendChild(nextIconHeight);
-
- var nextIconExt = xmlDoc.createElement("ext");
- nextIconExt.appendChild(xmlDoc.createTextNode(nextIconObj.getExt()));
- nextIconElement.appendChild(nextIconExt);
-
- allIcons.appendChild(nextIconElement);
- }
- rootElement.appendChild(allIcons);
-
- var allLinks = xmlDoc.createElement("links");
- for(var nextLinksKey in this.allLinks) {
- var nextLinkObj = this.allLinks[nextLinksKey];
- var nextLinkElement = xmlDoc.createElement("link");
- nextLinkElement.setAttribute("id", nextLinkObj.getID());
-
- var nextLinkText = xmlDoc.createElement("text");
- nextLinkText.appendChild(xmlDoc.createCDATASection(nextLinkObj.getText()));
- nextLinkElement.appendChild(nextLinkText);
-
- var nextLinkUrl = xmlDoc.createElement("url");
- nextLinkUrl.appendChild(xmlDoc.createCDATASection(nextLinkObj.getURL()));
- nextLinkElement.appendChild(nextLinkUrl);
-
- var nextLinkAlt = xmlDoc.createElement("alt");
- nextLinkAlt.appendChild(xmlDoc.createTextNode(nextLinkObj.getAlt()));
- nextLinkElement.appendChild(nextLinkAlt);
-
- var nextLinkIcon = xmlDoc.createElement("icon");
- nextLinkIcon.appendChild(xmlDoc.createTextNode(nextLinkObj.getIcon()));
- nextLinkElement.appendChild(nextLinkIcon);
-
- allLinks.appendChild(nextLinkElement);
- }
- rootElement.appendChild(allLinks);
-
- // add the root element!
- xmlDoc.appendChild(rootElement);
-
- return xmlDoc;
- },
-
- // THIS METHOD TRANSFORMS THIS OBJECT
- // TO XML STRING
- toXMLString : function() {
- var myDOM = this.toDOM();
- return myDOM.xml;
- },
-
- getInfo : function() {
- return this.info;
- },
-
- setInfo : function(myInfo) {
- this.info = myInfo;
- },
-
- getAllData : function() {
- return this.allData;
- },
-
- setAllData : function(myAllData) {
- this.allData = myAllData;
- },
-
- addData : function(myData) {
- this.allData[myData.getName()] = myData;
- },
-
- getDataByName : function(myDataName) {
- return this.allData[myDataName];
- },
-
- getAllWindows : function() {
- return this.allWindows;
- },
-
- setAllWindows : function(myAllWindows) {
- this.allWindows = myAllWindows;
- },
-
- addWindow : function(myWindow) {
- this.allWindows[myWindow.getName()] = myWindow;
- },
-
- getWindowByName : function(myWindowName) {
- return this.allWindows[myWindowName];
- },
-
- getAllMaps : function() {
- return this.allMaps;
- },
-
- setAllMaps : function(myAllMaps) {
- this.allMaps = myAllMaps;
- },
-
- addMap : function(myMap) {
- this.allMaps[myMap.getID()] = myMap;
- },
-
- getMapByID : function(myMapID) {
- return this.allMaps[myMapID];
- },
-
- getAllVideos : function() {
- return this.allVideos;
- },
-
- setAllVideos : function(myAllVideos) {
- this.allVideos = myAllVideos;
- },
-
- addVideo : function(myVideo) {
- this.allVideos[myVideo.getID()] = myVideo;
- },
-
- getVideoByID : function(myVideoID) {
- return this.allVideos[myVideoID];
- },
-
- getAllIcons : function() {
- return this.allIcons;
- },
-
- setAllIcons : function(myAllIcons) {
- this.allIcons = myAllIcons;
- },
-
- addIcon : function(myIcon) {
- this.allIcons[myIcon.getID()] = myIcon;
- },
-
- getIconByID : function(myIconID) {
- return this.allIcons[myIconID];
- },
-
- getAllLinks : function() {
- return this.allLinks;
- },
-
- setAllLinks : function(myAllLinks) {
- this.allLinks = myAllLinks;
- },
-
- addLink : function(myLink) {
- this.allLinks[myLink.getID()] = myLink;
- },
-
- getLinkByID : function(myLinkID) {
- return this.allLinks[myLinkID];
- }
- };
-
- /*************************************
- AppConfigInfo - Includes info
- on this appconfig object
- *************************************/
- function AppConfigInfo() {
- }
-
- AppConfigInfo.prototype = {
- version : null,
- lastupdate : null,
- initial : null,
-
- setVersion : function(myVersion) {
- this.version = myVersion;
- },
-
- getVersion : function() {
- return this.version;
- },
-
- setLastUpdate : function(myLastUpdate) {
- this.lastupdate = myLastUpdate;
- },
-
- getLastUpdate : function() {
- return this.lastupdate;
- },
-
- setIsInitial : function(myIsInitial) {
- this.initial = myIsInitial;
- },
-
- getIsInitial : function() {
- return this.initial;
- }
- };
-
- /***************************************
- AppWindow describes application
- window information
- ****************************************/
- function AppWindow() {
- }
-
- AppWindow.prototype = {
- name : null,
- title : null,
- width : null,
- height : null,
-
- getName : function() {
- return this.name;
- },
-
- setName : function(myName) {
- this.name = myName;
- },
-
- getTitle : function() {
- return this.title;
- },
-
- setTitle : function(myTitle) {
- this.title = myTitle;
- },
-
- getWidth : function() {
- return this.width;
- },
-
- setWidth : function(myWidth) {
- this.width = myWidth;
- },
-
- getHeight : function() {
- return this.height;
- },
-
- setHeight : function(myHeight) {
- this.height = myHeight;
- }
- };
-
- /***********************************
- AppData - describes app
- data information
- ***********************************/
- function AppData() {
- this.updateinterval = new AppDataUpdateInterval();
- this.dataurl = new AppDataURL();
- this.wxicons = new AppDataWxIcons();
- this.moonphaseicons = new AppDataMoonphaseIcons();
- }
-
- AppData.prototype = {
- name : null,
- updateinterval : null,
- dataurl : null,
- wxicons : null,
- moonphaseicons : null,
-
- getName : function() {
- return this.name;
- },
-
- setName : function(myName) {
- this.name = myName;
- },
-
- getUpdateInterval : function() {
- return this.updateinterval;
- },
-
- setUpdateInterval : function(myUpdateInterval) {
- this.updateinterval = myUpdateInterval;
- },
-
-
- getDataURL : function() {
- return this.dataurl;
- },
-
- setDataURL : function(myDataURL) {
- this.dataurl = myDataURL;
- },
-
- getWxIcons : function() {
- return this.wxicons;
- },
-
- setWxIcons : function(myWxIcons) {
- this.wxicons = myWxIcons;
- },
-
- getMoonPhaseIcons : function() {
- return this.moonphaseicons;
- },
-
- setMoonPhaseIcons : function(myMoonPhaseIcons) {
- this.moonphaseicons = myMoonPhaseIcons;
- }
- };
-
- /*******************************************
- AppDataUpdateInterval - describes app
- data update inteval information
- *********************************************/
- function AppDataUpdateInterval() {
- }
-
- AppDataUpdateInterval.prototype = {
- time : null,
- measure : null,
-
- getTime : function() {
- return this.time;
- },
-
- setTime : function(myTime) {
- this.time = myTime;
- },
-
- getMeasure : function() {
- return this.measure;
- },
-
- setMeasure : function(myMeasure) {
- this.measure = myMeasure;
- }
- };
-
- /*******************************************
- AppDataURL - describes app
- data url information
- *********************************************/
- function AppDataURL() {
- this.params = {};
- }
-
- AppDataURL.prototype = {
- base : null,
- params : null,
-
- getBase : function() {
- return this.base;
- },
-
- setBase : function(myBase) {
- this.base = myBase;
- },
-
- getParams : function() {
- return this.params;
- },
-
- setParams : function(myParams) {
- this.params = myParams;
- },
-
- getParamsByName : function(myParamName) {
- return this.params[myParamName];
- },
-
- addNewParam : function(myNewParam) {
- this.params[myNewParam.getName()] = myNewParam;
- }
- };
-
- /*******************************************
- AppDataURLParam - describes app
- data url parameter information
- *********************************************/
- function AppDataURLParam() {
- }
-
- AppDataURLParam.prototype = {
- name : null,
-
- getName : function() {
- return this.name;
- },
-
- setName : function(myName) {
- this.name = myName;
- }
- };
-
- /*******************************************
- AppDataWxIcons - describes app
- data wx icons information
- *********************************************/
- function AppDataWxIcons() {
- }
- AppDataWxIcons.prototype = {
- base : null,
- small : null,
- large : null,
-
- getBase : function() {
- return this.base;
- },
-
- setBase : function(myBase) {
- this.base = myBase;
- },
-
- getSmall : function() {
- return this.small;
- },
-
- setSmall : function(mySmall) {
- this.small = mySmall;
- },
-
- getLarge : function() {
- return this.large;
- },
-
- setLarge : function(myLarge) {
- this.large = myLarge;
- }
- };
-
- /*******************************************
- AppDataMoonphaseIcons - describes app
- data wx moonphase icons information
- *********************************************/
- function AppDataMoonphaseIcons() {
- }
- AppDataMoonphaseIcons.prototype = {
- base : null,
- getBase : function() {
- return this.base;
- },
-
- setBase : function(myBase) {
- this.base = myBase;
- }
- };
-
- /***************************
- AppMap - describes app
- maps information
- ***************************/
- function AppMap() {
- }
- AppMap.prototype = {
- id : null,
- isusonly : null,
- title : null,
- image : null,
- imagealt : null,
- imagewidth : null,
- imageheight : null,
- url : null,
-
- getID : function() {
- return this.id;
- },
-
- setID : function(myID) {
- this.id = myID;
- },
-
- isUSOnly : function() {
- return this.isusonly;
- },
-
- setIsUSOnly : function(myIsUSOnly) {
- this.isusonly = myIsUSOnly;
- },
-
- getTitle : function() {
- return this.title;
- },
-
- setTitle : function(myTitle) {
- this.title = myTitle;
- },
-
- getImage : function() {
- return this.image;
- },
-
- setImage : function(myImage){
- this.image = myImage;
- },
-
- getImageAlt : function() {
- return this.imagealt;
- },
-
- setImageAlt : function(myImageAlt){
- this.imagealt = myImageAlt;
- },
-
- getImageWidth : function() {
- return this.imagewidth;
- },
-
- setImageWidth : function(myImageWidth){
- this.imagewidth = myImageWidth;
- },
-
- getImageHeight : function() {
- return this.imageheight;
- },
-
- setImageHeight : function(myImageHeight){
- this.imageheight = myImageHeight;
- },
-
- getURL : function() {
- return this.url;
- },
-
- setURL : function(myURL) {
- this.url = myURL;
- }
- };
-
- /***************************
- AppVideo - describes app
- videos information
- ***************************/
- function AppVideo() {
- }
-
- AppVideo.prototype = {
- id : null,
- collection : null,
- name : null,
- image : null,
- imagealt : null,
- imagewidth : null,
- imageheigt : null,
- title : null,
- url : null,
-
- getURL : function() {
- return this.url;
- },
-
- setURL : function(myURL) {
- this.url = myURL;
- },
-
- getID : function() {
- return this.id;
- },
-
- setID : function(myID) {
- this.id = myID;
- },
-
- getCollection : function() {
- return this.collection;
- },
-
- setCollection : function(myCollection) {
- this.collection = myCollection;
- },
-
- getTitle : function() {
- return this.title;
- },
-
- setTitle : function(myTitle) {
- this.title = myTitle;
- },
-
- getImage : function() {
- return this.image;
- },
-
- setImage : function(myImage){
- this.image = myImage;
- },
-
- getImageAlt : function() {
- return this.imagealt;
- },
-
- setImageAlt : function(myImageAlt){
- this.imagealt = myImageAlt;
- },
-
- getImageWidth : function() {
- return this.imagewidth;
- },
-
- setImageWidth : function(myImageWidth){
- this.imagewidth = myImageWidth;
- },
-
- getImageHeight : function() {
- return this.imageheight;
- },
-
- setImageHeight : function(myImageHeight){
- this.imageheight = myImageHeight;
- },
-
- getName : function() {
- return this.name;
- },
-
- setName : function(myName) {
- this.name = myName;
- }
- };
-
- /***************************
- AppIcon - describes app
- icons information
- ***************************/
- function AppIcon() {
- }
-
- AppIcon.prototype = {
- id : null,
- url : null,
- name : null,
- alt : null,
- width : null,
- height : null,
- ext : null,
-
- getID : function() {
- return this.id;
- },
-
- setID : function(myID) {
- this.id = myID;
- },
-
- getURL : function() {
- return this.url;
- },
-
- setURL : function(myURL) {
- this.url = myURL;
- },
-
- getName : function() {
- return this.name;
- },
-
- setName : function(myName) {
- this.name = myName;
- },
-
- getAlt : function() {
- return this.alt;
- },
-
- setAlt : function(myAlt) {
- this.alt = myAlt;
- },
-
- getWidth : function() {
- return this.width;
- },
-
- setWidth : function(myWidth) {
- this.width = myWidth;
- },
-
- getHeight : function() {
- return this.height;
- },
-
- setHeight : function(myHeight) {
- this.height = myHeight;
- },
-
- getExt : function() {
- return this.ext;
- },
-
- setExt : function(myExt) {
- this.ext = myExt;
- }
- };
-
- /***************************
- AppLink - describes app
- links information
- ***************************/
- function AppLink() {
- }
-
- AppLink.prototype = {
- id : null,
- text : null,
- url : null,
- alt : null,
- icon : null,
-
- getID : function() {
- return this.id;
- },
-
- setID : function(myID) {
- this.id = myID;
- },
-
- getText : function() {
- return this.text;
- },
-
- setText : function(myText) {
- this.text = myText;
- },
-
- getURL : function() {
- return this.url;
- },
-
- setURL : function(myURL) {
- this.url = myURL;
- },
-
- getAlt : function() {
- return this.alt;
- },
-
- setAlt : function(myAlt) {
- this.alt = myAlt;
- },
-
- getIcon : function() {
- return this.icon;
- },
-
- setIcon : function(myIcon) {
- this.icon = myIcon;
- }
- };
-